Skip to content

Conversation

@gabejohnson
Copy link
Member

@gabejohnson gabejohnson commented May 14, 2016

This pull request addresses #515. It enables conversion from the Shift AST format used in sweet.js to the Babel format using a fork of shift-spidermonkey-converter: https://github.com/gabejohnson/shift-spidermonkey-converter-js/tree/babel.

The conversion allows Sweet to avoid generating code and passing that code to Babel to be re-parsed.

@gabejohnson
Copy link
Member Author

It the PR is accepted, I'll have to talk to the people at Shape Security about what to do with my fork of their lib.

// let result = babel.transform(wrapForCompiletime(estree, sandboxKeys));
let gen = codegen(parsed, new FormattedCodeGen);
let result = context.transform(gen, {
// let gen = codegen(parsed, new FormattedCodeGen);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can kill this comment

@disnet
Copy link
Member

disnet commented Jun 1, 2016

What's the current status on the npm package?

@gabejohnson
Copy link
Member Author

gabejohnson commented Jun 1, 2016

I submitted shapesecurity/shift-spidermonkey-converter-js#17 last week. It would allow Shape Security to host the base converter and then I could host an extension targeting Babel. I'm waiting to hear back from @michaelficarra.

I have the Babel extension written and will publish it pending the PR's acceptance and a new published version of shift-spidermonkey-converter (shift-estree-converter?).

@gabejohnson
Copy link
Member Author

@bakkot said he'd take a look at it next week.

@gabejohnson
Copy link
Member Author

I pinged @bakkot a couple of weeks ago, but still haven't heard back.

@michaelficarra
Copy link

Sorry about that @gabejohnson. Our current work has taken our focus off the Shift tooling for the time being, and @bakkot will be on hiatus for the next few months, but I promise you we'll get to your PR as soon as we can focus on the Shift tooling again. The ESTree converter is lower on our priority list since it's the only Shift tool we don't actually use in-house at @shapesecurity. But we really appreciate your contributions.

@gabejohnson
Copy link
Member Author

No worries @michaelficarra. Understood. Thanks for the update 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants